<template>
  <div class="top">
    <div class="logo">
      <a href="" @click.prevent="toIndex()"><img :src="require('@/assets/images/logo.png')" /></a>
    </div>
    <div class="search">
      <form>
        <input type="text" value="" class="s_ipt" />
        <input type="submit" value="搜索" class="s_btn" />
      </form>
      <span class="fl"
        ><a href="#">咖啡</a><a href="#">iphone 6S</a><a href="#">新鲜美食</a
        ><a href="#">蛋糕</a><a href="#">日用品</a><a href="#">连衣裙</a></span
      >
    </div>
    <div class="i_car">
      <div class="car_t">购物车 [ <span>3</span> ]</div>
      <div class="car_bg">
        <!--Begin 购物车未登录 Begin-->
        <div class="un_login">
          还未登录！<a href="Login.html" style="color: #ff4e00">马上登录</a>
          查看购物车！
        </div>
        <!--End 购物车未登录 End-->
        <!--Begin 购物车已登录 Begin-->
        <ul class="cars">
          <li>
            <div class="img">
              <a href="#"
                ><img src="images/car1.jpg" width="58" height="58"
              /></a>
            </div>
            <div class="name">
              <a href="#">法颂浪漫梦境50ML 香水女士持久清新淡香 送2ML小样3只</a>
            </div>
            <div class="price"><font color="#ff4e00">￥399</font> X1</div>
          </li>
          <li>
            <div class="img">
              <a href="#"
                ><img src="images/car2.jpg" width="58" height="58"
              /></a>
            </div>
            <div class="name">
              <a href="#">香奈儿（Chanel）邂逅活力淡香水50ml</a>
            </div>
            <div class="price"><font color="#ff4e00">￥399</font> X1</div>
          </li>
          <li>
            <div class="img">
              <a href="#"
                ><img src="images/car2.jpg" width="58" height="58"
              /></a>
            </div>
            <div class="name">
              <a href="#">香奈儿（Chanel）邂逅活力淡香水50ml</a>
            </div>
            <div class="price"><font color="#ff4e00">￥399</font> X1</div>
          </li>
        </ul>
        <div class="price_sum">
          共计&nbsp; <font color="#ff4e00">￥</font><span>1058</span>
        </div>
        <div class="price_a"><a href="#">去购物车结算</a></div>
        <!--End 购物车已登录 End-->
      </div>
    </div>
  </div>
</template>

<script>
export default {
    name:'HeaderSearch',
    methods:{
      toIndex(){
        if(!(this.$route.path === '/')){
          this.$router.push({name:'index'})
        }
      }
    }
};
</script>

<style>
</style>